/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#assistant-view {
  display: none;
}

#assistant-view.selected {
  display: flex;
  flex-direction: column;
}

#assistant-content {
  flex: 1;
  display: flex;
  padding-top: 8rem;
  padding-bottom: 1rem;
  max-height: calc(100% - 10rem);
  box-sizing: border-box;
}

#assistant-controls {
  text-align: center;
  height: 10rem;
}

#assistant-messages {
  flex: 1;
  overflow: auto;
  padding-right: 4rem;
  padding-left: 4rem;
  overflow: auto;
}

#assistant-hint {
  position: absolute;
  top: 50%;
  left: 20%;
  max-width: 40%;
  color: white;
  font-size: 1.6rem;
  font-style: italic;
  transform: translateY(-50%);
}

#assistant-hint.hidden {
  display: none;
}

.assistant-message-outgoing,
.assistant-message-incoming {
  position: relative;
  text-align: left;
  background-color: #c8ddec;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 24rem;
  font-size: 1.6rem;
  margin-left: auto;
}

.assistant-message-outgoing::after,
.assistant-message-incoming::after {
  content: "";
  position: absolute;
  border-style: solid;
  display: block;
  width: 0;
  bottom: 0.5rem;
  border-color: transparent #c8ddec;
}

.assistant-message-outgoing::after {
  border-width: 1.2rem 2rem 0 0;
  left: -2rem;
}

.assistant-message-incoming::after {
  border-width: 1.2rem 0 0 2rem;
  right: -2rem;
}

#assistant-avatar {
  flex: 1;
}

#assistant-avatar-image {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 9rem;
  display: block;
  margin: auto;
}

#assistant-speech-button {
  background-image: url('/optimized-images/microphone-icon.svg');
  width: 5.6rem;
  height: 5.6rem;
  background-color: #92bcda;
  background-size: 3.2rem;
  background-position: center;
  opacity: 1;
  z-index: 10;
  border-radius: 2.8rem;
  margin-left: -2.8rem;
}

#assistant-speech-button:hover {
  background-color: #a6c8e1;
}

#assistant-speech-button.active {
  background-image: url('/optimized-images/microphone-icon-active.svg');
}

#assistant-text-input {
  width: calc(100% - 16rem);
  max-width: 30rem;
  padding: 1rem 3rem 1rem 4rem;
  margin: 1.2rem 0;
  height: 1.2rem;
  background-color: #7dafd2;
  color: #fff;
}

#assistant-text-input:focus {
  background-color: #d2d9de;
  color: #000;
}

#assistant-text-submit {
  width: 3.2rem;
  height: 3.2rem;
  background-image: url('/optimized-images/input-arrow.svg');
  background-size: 1.6rem;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 10;
  position: absolute;
  margin: 1.2rem 0 1.2rem -3rem;
  padding: 0;
  background-color: transparent;
  outline: 0;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: none;
  opacity: 0;
}

#assistant-text-input:focus + #assistant-text-submit {
  opacity: 0.8;
}

#assistant-text-input:focus + #assistant-text-submit:hover {
  opacity: 1.0;
}

#assistant-stm-levels {
  height: 16rem;
  width: 16rem;
  position: absolute;
  padding: 0;
  margin-left: -8rem;
  margin-top: -5.1rem;
}

#assistant-stm-levels.hidden {
  display: none;
}
